<template>

  <div>
    <input type="text" v-model="user.score" placeholder="请输入分数">
    <user-profile :user="user"></user-profile>
    <button @click="user.count++">增加1</button>
    <button @click="user.count--">减少1</button>
  </div>

</template>

<script>
import UserProfile from './user-profile.vue';


export default {
  components: {
    UserProfile
  },
  data() {
    return {
      user: {
        name: 'wang yi',
        age: 30,
        score: '',
        count: 0,
      }
    };
  }
};
</script>